import {
  myRequest
} from '@/common/request.js'
// 第四个参数为true 的话是不用携带用户信息

/**
 *注册验证码
 */
export function userCodeRegister(params) {
  return myRequest(
    '/api/login/sendRegister',
    'POST',
    params,
    true
  )
}

/**
 *注册
 */
export function userRegister(params) {
  return myRequest(
    '/api/login/register',
    'POST',
    params,
    true
  )
}

/**
 *找回密码验证码
 */
export function userCode(params) {
  return myRequest(
    '/api/sms/sendVer',
    'POST',
    params,
    true
  )
}

/**
 *找回密码
 */
export function resetPassword(params) {
  return myRequest(
    '/api/login/forget_pass',
    'POST',
    params,
    true
  )
}

// 获取多人骰宝游戏配置
export function getDiceConfig(params) {
  return myRequest(
    '/api/game/getDiceConfig',
    'POST',
    params
  )
}

// 多人骰宝游戏下注接口
export function setDiceBet(params) {
  return myRequest(
    '/api/game/setDiceBet',
    'POST',
    params
  )
}
// 获取多人骰宝游戏状态接口
export function getDiceStatus(params) {
  return myRequest(
    '/api/game/getDiceStatus',
    'POST',
    params
  )
}

// 获取疯狂动物游戏配置
export function getTigerConfig(params) {
  return myRequest(
    '/api/game/getTigerConfig',
    'POST',
    params
  )
}

//  疯狂动物下注接口（下注参数格式参照apicloud版本）
// 参数为number
export function setTigerBet(params) {
  return myRequest(
    '/api/game/setTigerBet',
    'POST',
    params
  )
}

// 商城列表
export function goodsList(params) {
  return myRequest(
    '/api/Shop/goodsList',
    'POST',
    params
  )
}

// 商品详情
export function getGoodsDetail(params) {
  return myRequest(
    '/api/Shop/goodsInfo',
    'POST',
    params
  )
}

/**
 * 立即支付渲染
 */
export function getGoodsConfirm(params) {
  return myRequest(
    '/api/Shop/submitOrder',
    'POST',
    params
  )
}

/**
 * 创建订单
 */
export function putGoodsOrder(params) {
  return myRequest(
    '/api/Shop/confirmOrder',
    'POST',
    params
  )
}

/**
 * 立即支付
 */
export function putOrderPay(params) {
  return myRequest(
    '/api/Shop/orderPayment',
    'POST',
    params
  )
}

/**
 * 新增修改收货地址
 */
export function putAddress(params) {
  return myRequest(
    '/api/Shop/addressAdd',
    'POST',
    params
  )
}

/**
 * 修改地址渲染
 */
export function updateAddress(params) {
  return myRequest(
    '/api/Shop/addressEdit',
    'POST',
    params
  )
}

/**
 *总资产
 */
export function getAssetsIndex(params) {
  return myRequest(
    '/api/mutualaidorder/assetsIndex',
    'POST',
    params
  )
}

/**
 我的团队
 */
export function getTeamList(params) {
  return myRequest(
    '/api/personal/team',
    'POST',
    params
  )
}

/**
松果明细
 */
export function getEnerygLog(params) {
  return myRequest(
    '/api/mutualaidorder/accountIndex',
    'POST',
    params
  )
}

/**
 微分转增
 */
export function putEnerygTransfer(params) {
  return myRequest(
    '/api/mutualaidorder/energyTransfer',
    'POST',
    params
  )
}

/**
预约记录
 */
export function getAppointLog(params) {
  return myRequest(
    '/api/trade/appointLog',
    'POST',
    params
  )
}

/**
转让记录
 */
export function getTransferList(params) {
  return myRequest(
    '/api/trade/transferList',
    'POST',
    params
  )
}

/**
 拆分宠物
 */
export function exchangeWater(params) {
  return myRequest(
    '/api/mutual/splitPets',
    'POST',
    params
  )
}

/**
上架
 * @export
 * @returns
 */
export function putGrounding(params) {
  return myRequest(
    '/api/trade/shelves',
    'POST',
    params
  )
}

/**
 * 取消订单
 */
export function cancelOrder(params) {
  return myRequest(
    '/api/Shop/orderCancel',
    'POST',
    params
  )
}

/**
 *收益渲染
 */
export function getRewardIndex(params) {
  return myRequest(
    '/api/mutualaidorder/accountLog',
    'POST',
    params
  )
}

/**
 * 确认订单
 * @export
 * @returns
 */
export function orderComplete(params) {
  return myRequest(
    '/api/Shop/orderComplete',
    'POST',
    params
  )
}

/**
领养记录
 */
export function getAdoptList(params) {
  return myRequest(
    '/api/trade/adoptList',
    'POST',
    params
  )
}

/**
 *转盘内容
 */
export function getTurntable(params) {
  return myRequest(
    '/api/luckys/turntable',
    'POST',
    params
  )
}

/**
 *申请转盘
 */
export function getLuckDraw(params) {
  return myRequest(
    '/api/luckys/luckDraw',
    'POST',
    params
  )
}

/**
 *转盘记录
 */
export function getTurntableLog(params) {
  return myRequest(
    '/api/luckys/turntableLog',
    'POST',
    params
  )
}

/**
 *子币渲染
 */
export function getCoinIndex(params) {
  return myRequest(
    '/api/mutualaidorder/coinList',
    'POST',
    params
  )
}

/**
 *获取版本号
 和更新包地址
 */
export function checkVersion(params) {
  return myRequest(
    '/api/login/versionUp',
    'POST',
    params
  )
}

/**
收款方式渲染
 */
export function getReceiveMoneyWayIndex(params) {
  return myRequest(
    '/api/personal/paymentInfo',
    'POST',
    params
  )
}
/**
收款方式
 */
export function putReceiveMoneyWay(params) {
  return myRequest(
    '/api/personal/paymentMethod',
    'POST',
    params
  )
}

/**
公告详情
 */
export function getNoticeInfo(params) {
  return myRequest(
    '/api/index/noticeInfo',
    'POST',
    params
  )
}

/**
公告列表
 */
export function homeSwiperNotice(params) {
  return myRequest(
    '/api/index/indexNoticeList',
    'POST',
    params
  )
}
